
#include <BHBoxLayout>
#include <BVBoxLayout>
#include <BGridLayout>

#include <BLabel>
#include <BButton>

#include "TextEditor.h"
#include "StyleEditDialog.h"

StyleEditDialog::StyleEditDialog(BWidget* parent) : BDialog(parent)
{
	BHBoxLayout* centerLayout = new BHBoxLayout(this);
	{
		_typeListWidget = new BListWidget("type");
		_signListWidget = new BListWidget("sign");

		BVBoxLayout* valueLayout = new BVBoxLayout("value");
		{
			BGridLayout* gridLayout = new BGridLayout();
			{
				_colorButton = new BButton();
				_fontButton = new BButton();
				gridLayout->addWidget(0, 0, new BLabel("color"));
				gridLayout->addWidget(0, 1, _colorButton);
				gridLayout->addWidget(1, 0, new BLabel("font"));
				gridLayout->addWidget(1, 1, _fontButton);
			}

			_sampleLayout = new BStackLayout("sample");

			valueLayout->addLayout(gridLayout);
			valueLayout->addLayout(_sampleLayout);
		}

		centerLayout->addWidget(_typeListWidget);
		centerLayout->addWidget(_signListWidget);
		centerLayout->addLayout(valueLayout);
	}

	TextEditor* xmlEditor = new TextEditor();
	xmlEditor->setName("xml");
	xmlEditor->setText("");
	_sampleLayout->addWidget(xmlEditor);
	_sampleLayout->setCurrent(0);
}
StyleEditDialog::~StyleEditDialog()
{

}

void StyleEditDialog::slotAssetChanged(BObject* object, const BValue& value)
{

}
